× Introduction Setup Environment Building blocks Built-in functions Data Types Strings Operators Conditional statements Loop statements Functions Arrays Understaing Objects Date Object Number Object Math Object String Object Window Location Navigator History DOM Basics Forms
   Programs
Basic Control Loops Functions Arrays Examples Projects Quick Ref.
   Exercises
Variables Data Types Operators Decision Loops Reeborg's World



Javascript Introduction

In this tutorial you will learn javascript capabilities.


What Is JavaScript?

JavaScript is a programming language that was first released in 1995.It is an interpreted programming language with object-oriented capabilities. Its syntax has some similarities in syntax to most popular programming languages like C, Java and php.

It is designed to add interactivity and dynamic effects to the web pages. JavaScript programs are "scripts" that are read and executed by an interpreter (or engine).It is the most popular and widely used client-side scripting language. Client-side scripting refers to scripts that run within your web browser.

JavaScript was originally developed as LiveScript by Netscape in the mid 1990s. It was later renamed to JavaScript in 1995, and became an ECMA standard in 1997. Now JavaScript is the standard client-side scripting language for web-based applications, and it is supported by virtually all web browsers available today, such as Google Chrome, Mozilla Firefox, Apple Safari, etc. JavaScript is officially maintained by ECMA (European Computer Manufacturers Association) as ECMAScript. ECMAScript 6 (or ES6) is the latest major version of the ECMAScript standard.

What You Can Do with JavaScript

There are lot more things you can do with JavaScript.

  • You can modify the content of a web page by adding or removing elements.
  • You can change the style and position of the elements on a web page.
  • You can monitor events like mouse click, hover, etc. and react to it.
  • You can perform and control transitions and animations.
  • You can create alert pop-ups to display info or warning messages to the user.
  • You can perform operations based on user inputs and display the results.
  • You can validate user inputs before submitting it to the server.

The list does not end here, there are many other interesting things that you can do with JavaScript. You will learn about all of them in detail in upcoming chapters.

Advantages of JavaScript

  • Less server interaction: You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
  • Immediate feedback to the visitors: They don't have to wait for a page reload to see if they have forgotten to enter something.
  • Increased interactivity: You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.
  • Richer interfaces: You can use JavaScript to include such items as dragand-drop components and sliders to give a Rich Interface to your site visitors.

Limitations of JavaScript

We cannot treat JavaScript as a full-fledged programming language. It lacks the following important features:

  • Client-side JavaScript does not allow the reading or writing of files. This has been kept for security reason.
  • JavaScript cannot be used for networking applications because there is no such support available.
  • JavaScript doesn't have any multithreading or multiprocessor capabilities.